'use strict';
import Mock from 'mockjs';
import * as user from './user'
// 配置Ajax请求延时，可用来测试网络延迟大时项目中一些效果
Mock.setup({
    timeout: 1000
});
// 登陆
Mock.mock('/dev/login', 'post', {
    'code': 200,
    'subCode': '',
    'data': {
        'access_token': '@string(20,30)',
        'expires_in': 119,
        'jti': '949fc9ea-52e1-409c-a2ba-bf6733583355',
        'operId': 'wyyadmin',
        'refresh_token': '@string(20,30)',
        'scope': 'all',
        'token_type': 'bearer',
        'msg': ''
    }
});
// 登录人信息
Mock.mock('/dev/userInfo', 'get', {
    'msg': '登录成功！',
    'code': 200,
    'data': {
        'operId': '@string("upper",5)',
        'orgNo': '41101',
        'orgName': '国网河南省电力公司',
        'deptName': '营销部（客户服务中心）',
        'operName': '@cname(3)',
        'orgType': '02',
        'ip': '@ip',
        'sessionId': '@string(20,30)',
        'needResetPwd': false
    }
});
// 菜单
Mock.mock('/dev/menus', 'get', require('@mock/data/menus.json'));
// 组织结构树
Mock.mock('/dev/orgData', 'get', require('@mock/data/orgData.json'));

Mock.mock('/dev/score/add', 'post', user.userAdd);

Mock.mock('/dev/score/list', 'post', user.userQuery);

Mock.mock('/dev/score/update', 'post', user.userUpdate);

Mock.mock('/dev/score/delete', 'post', user.userDelete);